import java.util.ArrayList;
import java.util.List;

public class TangSeng implements Master {

    private List<Apprentice> disciples;

    public TangSeng(){
        this.disciples = new ArrayList<>();
    }

    public void addDisciple(Apprentice disciple){
        this.disciples.add(disciple);
    }

    @Override
    public void sendMessage(String message, Apprentice apprentice) {
        for(Apprentice disciple : disciples){
            if (disciple != apprentice){
                disciple.receiveMessage(message);
            }
        }

    }
}
